//
//  ChatRoomMessageViewController.h
//  suRead
//
//  Created by 师爱华 on 17/2/27.
//  Copyright © 2017年 bao. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "RCDLiveMessageBaseCell.h"
#import "RCDLiveMessageModel.h"

@interface ChatRoomMessageViewController : UIViewController

/*!
 会话页面的CollectionView
 */
@property(nonatomic, strong) UICollectionView *conversationMessageCollectionView;
/*!
 聊天内容的消息Cell数据模型的数据源
 
 @discussion 数据源中存放的元素为消息Cell的数据模型，即RCDLiveMessageModel对象。
 */
@property(nonatomic, strong) NSMutableArray<RCDLiveMessageModel *> *conversationDataRepository;
/**
 *  滚动条不在底部的时候，接收到消息不滚动到底部，记录未读消息数
 */
@property (nonatomic, assign) NSInteger unreadNewMsgCount;
/**
 *  底部显示未读消息view
 */
@property (nonatomic, strong) UIView *unreadButtonView;
@property(nonatomic, strong) UILabel *unReadNewMessageLabel;
/**
 *  是否正在加载消息
 */
@property(nonatomic) BOOL isLoading;
/**
 *  是否需要滚动到底部
 */
@property(nonatomic, assign) BOOL isNeedScrollToButtom;
/**
 *  存储长按返回的消息的model
 */
@property(nonatomic, strong) RCDLiveMessageModel *longPressSelectedModel;




- (void)appendAndDisplayMessage:(RCMessage *)rcMessage;
- (void)pushOldMessageModel:(RCDLiveMessageModel *)model;
- (void)updateUnreadMsgCountLabel;
- (void)scrollToBottomAnimated:(BOOL)animated;
- (BOOL)isAtTheBottomOfTableView;

@end
